package com.jyz.support.dao;

import java.io.Serializable;
import java.util.List;

import org.hibernate.criterion.DetachedCriteria;

import com.jyz.support.exceptions.DAOException;


public interface IDAO {
	public Object create(Object object) throws DAOException;

	public void update(Object object) throws DAOException;

	public void delete(Object object) throws DAOException;
	
	public void deleteAll(List lstObj) throws DAOException;

	public Object findByID(Class clazz, Serializable id) throws DAOException;

	public List findAll(Class clazz) throws DAOException;

	public List findByHQL(String hql) throws DAOException;
	
	public List findByCriteria(DetachedCriteria criteria) throws DAOException;
	
	public List findByCriteria(DetachedCriteria criteria, int firstResult, int maxResults) throws DAOException;
	
	public List pagedList(String hql, int recordIndex, int pageSize) throws DAOException;
}
